package com.test.util;

import com.aierkeji.b2c.entity.snapshot.AkjAlipayLifeSnap;

public class AlipayConfigVo {

	
	public String id = "11";
	public String PID = "";
	public String PID_NAME  = "";
	public String APPID = "";
	public String RSA_PRIVATE_KEY = "";
	public String ALIPAY_PUBLIC_KEY  = "";
	public String URL = "https://openapi.alipay.com/gateway.do";
	public String FORMAT = "json";
	public String CHARSET = "utf-8";
	public String SIGNTYPE= "RSA2";
	
//	public static  AlipayConfigVo builder(AkjAlipayLife akjAlipayLife) {
//		AlipayConfigVo alipayConfigVo = new AlipayConfigVo();
//		alipayConfigVo.setPID(akjAlipayLife.getPid());
//		alipayConfigVo.setPID_NAME(akjAlipayLife.getPidName());
//		alipayConfigVo.setAPPID(akjAlipayLife.getLifeId());
//		alipayConfigVo.setRSA_PRIVATE_KEY(akjAlipayLife.getPrivteKey());
//		alipayConfigVo.setALIPAY_PUBLIC_KEY(akjAlipayLife.getAlipayPublicKey());
//		return alipayConfigVo;
//	}
	
	public static AlipayConfigVo builder(AkjAlipayLifeSnap akjAlipayLifeSnap) {
//		AkjAlipayLife akjAlipayLife = new AkjAlipayLife();
//		BeanUtils.copyProperties(akjAlipayLifeSnap, akjAlipayLife);
//		
		AlipayConfigVo alipayConfigVo = new AlipayConfigVo();
		alipayConfigVo.setPID(akjAlipayLifeSnap.getAkjMerchants().getPid());
		alipayConfigVo.setPID_NAME(akjAlipayLifeSnap.getAkjMerchants().getPidName());
		alipayConfigVo.setAPPID(akjAlipayLifeSnap.getLifeId());
		alipayConfigVo.setRSA_PRIVATE_KEY(akjAlipayLifeSnap.getPrivteKey());
		alipayConfigVo.setALIPAY_PUBLIC_KEY(akjAlipayLifeSnap.getAlipayPublicKey());
		return alipayConfigVo;
	}
	
	
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getPID() {
		return PID;
	}
	public void setPID(String pID) {
		PID = pID;
	}
	public String getPID_NAME() {
		return PID_NAME;
	}
	public void setPID_NAME(String pID_NAME) {
		PID_NAME = pID_NAME;
	}
	public String getAPPID() {
		return APPID;
	}
	public void setAPPID(String aPPID) {
		APPID = aPPID;
	}
	public String getRSA_PRIVATE_KEY() {
		return RSA_PRIVATE_KEY;
	}
	public void setRSA_PRIVATE_KEY(String rSA_PRIVATE_KEY) {
		RSA_PRIVATE_KEY = rSA_PRIVATE_KEY;
	}
	public String getALIPAY_PUBLIC_KEY() {
		return ALIPAY_PUBLIC_KEY;
	}
	public void setALIPAY_PUBLIC_KEY(String aLIPAY_PUBLIC_KEY) {
		ALIPAY_PUBLIC_KEY = aLIPAY_PUBLIC_KEY;
	}
	public String getURL() {
		return URL;
	}
	public void setURL(String uRL) {
		URL = uRL;
	}
	public String getFORMAT() {
		return FORMAT;
	}
	public void setFORMAT(String fORMAT) {
		FORMAT = fORMAT;
	}
	public String getCHARSET() {
		return CHARSET;
	}
	public void setCHARSET(String cHARSET) {
		CHARSET = cHARSET;
	}
	public String getSIGNTYPE() {
		return SIGNTYPE;
	}
	public void setSIGNTYPE(String sIGNTYPE) {
		SIGNTYPE = sIGNTYPE;
	}



	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ALIPAY_PUBLIC_KEY == null) ? 0 : ALIPAY_PUBLIC_KEY.hashCode());
		result = prime * result + ((APPID == null) ? 0 : APPID.hashCode());
		result = prime * result + ((PID == null) ? 0 : PID.hashCode());
		result = prime * result + ((PID_NAME == null) ? 0 : PID_NAME.hashCode());
		result = prime * result + ((RSA_PRIVATE_KEY == null) ? 0 : RSA_PRIVATE_KEY.hashCode());
		return result;
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AlipayConfigVo other = (AlipayConfigVo) obj;
		if (ALIPAY_PUBLIC_KEY == null) {
			if (other.ALIPAY_PUBLIC_KEY != null)
				return false;
		} else if (!ALIPAY_PUBLIC_KEY.equals(other.ALIPAY_PUBLIC_KEY))
			return false;
		if (APPID == null) {
			if (other.APPID != null)
				return false;
		} else if (!APPID.equals(other.APPID))
			return false;
		if (PID == null) {
			if (other.PID != null)
				return false;
		} else if (!PID.equals(other.PID))
			return false;
		if (PID_NAME == null) {
			if (other.PID_NAME != null)
				return false;
		} else if (!PID_NAME.equals(other.PID_NAME))
			return false;
		if (RSA_PRIVATE_KEY == null) {
			if (other.RSA_PRIVATE_KEY != null)
				return false;
		} else if (!RSA_PRIVATE_KEY.equals(other.RSA_PRIVATE_KEY))
			return false;
		return true;
	}



	


	
	
}
